package cn.cn.com.bsoft.mobile

import cn.net.xyan.blossom.core.service.ConfigService
import cn.net.xyan.blossom.kotlin.AllOpen
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.context.annotation.Bean
import javax.annotation.PostConstruct

@AllOpen
@SpringBootApplication
class TestApplication{

    @Bean
    fun setupService():SetupService = SetupService()
}


class SetupService{

    @Autowired
    lateinit var configService:ConfigService

    @PostConstruct
    fun setup(){
        configService.setupVariable(ConfigService.KEYAppRoot,"https://i.mhwsjsw.gov.cn/pay","应用地址")
    }
}

fun main(args: Array<String>) {
    SpringApplication.run(TestApplication::class.java, *args)
}